package cn.lyf.stream;

import java.util.function.Function;
import java.util.stream.Stream;

public class ApplyMap<T, R> implements Function<T, Stream<R>> {
    final Stream<Function<T, R>> fxs;

    public ApplyMap(Stream<Function<T, R>> fxs) {
        this.fxs = fxs;
    }

    @Override
    public Stream<R> apply(T t) {
        return fxs.map(f -> f.apply(t));
    }

}
